package com.ec.generator.modules.dynamic.dto;

import com.ec.core.mybatis.groups.ValidatorGroup;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author Eric Lee
 * @Description:
 * @time: 2022/2/9 16:56
 */
@Data
public class DynamicDbDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotBlank(message = "dbType不能为空", groups = {ValidatorGroup.Other.class})
    @NotNull(message = "dbType不能为空", groups = {ValidatorGroup.Other.class})
    private String dbDriverClass;

    @NotBlank(message = "dbIp不能为空", groups = {ValidatorGroup.Other.class})
    @NotNull(message = "dbIp不能为空", groups = {ValidatorGroup.Other.class})
    private String dbIp;

    @NotBlank(message = "dbPort不能为空", groups = {ValidatorGroup.Other.class})
    @NotNull(message = "dbPort不能为空", groups = {ValidatorGroup.Other.class})
    private String dbPort;

    @NotBlank(message = "dbName不能为空", groups = {ValidatorGroup.Other.class})
    @NotNull(message = "dbName不能为空", groups = {ValidatorGroup.Other.class})
    private String dbName;

    @NotBlank(message = "dbUser不能为空", groups = {ValidatorGroup.Other.class})
    @NotNull(message = "dbUser不能为空", groups = {ValidatorGroup.Other.class})
    private String dbUser;

    @NotBlank(message = "dbPassword不能为空", groups = {ValidatorGroup.Other.class})
    @NotNull(message = "dbPassword不能为空", groups = {ValidatorGroup.Other.class})
    private String dbPassword;
}
